<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <iframe id ="myframe" src="http://test2.jsplusplus.com/index2.html"></iframe>
    <script type="text/javascript">
          var hash = location.hash.substring(1),
              frame = document.getElementById('myframe');
     switch(hash){
         case 'getCourses': 
         $.POST('http://test.jsplusplus.com/get_Courses.php',{
         status:1
         },function(data){
          var str = JSON.stringify(data);
              frame.src = "http://test2.jsplusplus.com/index2.html#"+str;  
          });
        break;
     }
   
 
      
   </script>
</body>
</html>